#include "../process.h"
#include "cluster.h"
#include "edge_checker\click_checker.h"
#include "../log/log_mgr.h"

int main(int argc, const char* argv[])
{
	fstream log(argv[1], fstream::in);
	fstream out(argv[2], fstream::out);

	util::LogMgr::init(argc, argv);
	Cluster cluster;
	ClickChecker clickChecker;
	util::LogMgr::time_start();
	while(!log.eof())
	{
		string line;
		getline(log, line);
		cluster.init_query(line);
	}
	cout << "start update_edge\n";
	cluster.graph.update_edge(clickChecker);
	cout << "\nstart flooding\n";
	cluster.display(&out);
	util::LogMgr::time_end();
	log.close();
	out.close();
}